package org.huntaway.kernel.mode.state.imp;

import org.huntaway.kernel.mode.state.Person2;
import org.huntaway.kernel.mode.state.model.MoodState;

public class Angry2 implements MoodState {
	Person2 p;

	public Angry2(Person2 p) {
		this.p = p;
	}

	@Override
	public void doSomething() {
		p.setiNum(p.getiNum()+1);
		System.out.println("I'm angry!");
	}

	@Override
	public void changeState() {
		p.setState(new Happy2(p));
		p.doSomething();
	}
}
